The invention relates to a method of isolating a memory location containing an obsolete value, using a data administrator managing a shared "transaction" memory, and allowing access to the data via pointers, said method being applicable to any real time and/or on-board application. Such a memory is the central memory of a computer in which a plurality of processes are executed simultaneously. Each process is itself generally constituted by a plurality of elementary tasks which may be in competition with one another for accessing the data in order to read and modify it. The memory is structured as fixed-size elements which are referred to below as "memory locations".
A computer has a central memory of limited capacity, but in which all the locations are accessed directly, and therefore very fast, and mass storage generally constituted by a hard disk, having a much larger capacity but much slower access time since it is necessary to select a track then wait for the desired location on a track to present itself to a read head. Conventionally, the computer operating system loads only the data which is actually required at a given instant into the central memory, and loading is performed by means of a small, fast, specialized memory which is called a "cache" memory and which provides a noticeable increase in speed of access to the hard disk by an anticipation mechanism which makes use of the fact that applications generally use data sequentially. Conventional data administrators have therefore been optimized on the assumption that data passes via a cache memory.
The progress of semi-conductor memory technology now enables a central memory to be made that has sufficient capacity to load into central memory all of the data shared by all of the processes being executed in a computer, even for applications that manipulate large volumes of data. Thus, the role of the hard disk is merely to safeguard data by keeping an up-to-date copy of all the data which is in central memory. Loading all of the data into central memory is particularly advantageous for applications which do not make use of data sequentially, cache memory being only of limited benefit to such applications. This is particularly the case for applications controlling telecommunications exchanges.
Data administrators for object-oriented databases, and data administrators for relational databases are known.
There are two types of data access: read access or write access. For each access type, two methods of data transfer between the data administrator and an elementary task are known: a value transfer method, and a pointer transfer method.
For read (or write) access to the value of a variable, the value transfer method consists in reading (or writing) a value of the variable in the memory location which contains the current value of the variable; while the pointer transfer method consists in providing the task which has requested a read (or a write) with an address, called a "pointer", which designates the memory location where the value to be read is situated (or the location where a value is to be written), with the task then being free to read (or write) in said location for as long as it has said pointer. When a task accesses a variable using the pointer method, it assigns a lock called a "hold" to the memory location which contains the current value of said variable, for said task. Said hold prevents any other task from accessing said location so as to maintain consistency of the data seen by each task. The task which possesses a hold on a memory location containing a value of a variable can access said location as often as it likes, and for as long as it decides not to release said hold.
The pointer transfer method is known in object-oriented data administrators. It has the advantage of allowing fast access. It allows data to be manipulated like a programming language variable. However, object-oriented data administrators have a drawback: either they do not offer multitasking transactions (consequently there is no competition), or they do not offer object-locking (any competition causes a page to lock and results in the entire page being copied into a journal. This level of granularity therefore leads to additional cost).
The value transfer method can be used in applications without managing access competition. Access competition is managed mainly by means of read or write locks which are assigned by the database data administrator.
A set of read and/or write operations, directed towards a plurality of variables, requested by a task in a single request is called a "transaction". In a transaction each operation can be made either by the value transfer method, or by the pointer transfer method. All transactions are made up of three phases:
an opening phase, during which the data administrator provides a unique transaction identifier for the task which has opened the transaction, said identifier designating a memory location containing a transaction descriptor; PA1 an access phase, during which read or write operations are executed by the task that has opened the transaction, but which cannot be seen by users not involved in said transaction; and during which rights called "read locks" and "write locks" are assigned to said transaction for the memory location under consideration. In a known access method, when a transaction performs a write access, it provisionally records the new value of the variable in a memory location called a "journal" which is assigned to said transaction for said variable. Said journal can be accessed only by said transaction; and PA1 a closing or validation phase, during which the writes and reads are validated. In the above-mentioned known method, the new values (which are contained in the journals assigned to said transaction) are recorded in the respective locations containing the current values, and they can then be seen by all tasks. The read values are indeed read. The journals, locks, and holds assigned to said transaction are released. PA1 atomism (either all accesses requested by a transaction are processed, or else none are); PA1 consistency (all data passes from one stable state to another stable state); PA1 isolation (new values of the variables are not seen from outside the transaction, until the transaction has closed); PA1 durability (as soon as a transaction is validated, the new values of the variables withstand failure of the station on which they are stored; said values being safeguarded on a disk or on another station which is in operation); and PA1 serialization (if a plurality of transactions take place in parallel, the result thereof is the same as if they took place successively). PA1 if said first transaction is an aborted transaction, and:
However, it is possible for a transaction to be aborted either at the request of the task that requested opening of said transaction, or because of conflict with another transaction, or because of a discrepancy in a request constituting said transaction.
A lock can be assigned to the memory location containing the current value or the new value of a variable which is the subject of a transaction, in order to prevent other operations which would compromise data consistency. A lock can be assigned to the entire data table.
Certain transaction protocols allow a transaction to be performed while guaranteeing four properties, called "ACID":
Patent application FR 2 727 222 describes such a transaction protocol. Known data administrators guarantee ACID properties but they have the drawback of not offering pointer access which would allow faster access. They are therefore not completely satisfactory.
In the context of a system where all the data is loaded into a central semi-conductor memory, it is possible to perform accesses via pointers, within a transaction or outside a transaction, but the use of pointers, and therefore of holds, creates a drawback: When a first transaction is aborted, a hold can remain assigned to a memory location while the value contained in said location has become obsolete. Said value is obsolete because said location is the journal containing the current value of a variable, or the new value that said first transaction was going to give to said variable.
Said hold continues to prevent access to said location, and therefore continues to prevent access to said variable, because said memory location remains assigned to said variable for storing its current value or its new value as the case may be. Said variable therefore remains unnecessarily inaccessible, until the application which possesses said hold decides to release it. During this time, one or more other transactions may be waiting to access said variable. Such unnecessary waiting slows down the overall performance of the system.